// 封装购物车相关接口
import http from '@/utils/http'
export const insertCartAPI=({ skuId,count})=>{
    return http({
        url:'/member/cart',
        method:'post'  ,
        data:{
            skuId,
            count
        } 
    })
}
//获取最新的购物车列表
export const findNewCartListAPI=()=>{
    return http({
        url:'/member/cart',
        method:'get'
    })
}
//封装删除购物车列表接口
export const deleteCartAPI=(ids)=>{
    return http({
        url:'/member/cart/',
        method:'delete',
        data:{
            ids
        }
    })
}
//合并购物车的接口
export const mergeCartAPI=(data)=>{
    return http({
        url:'/member/cart/merge',
        method:'post',
        data
    })
}